import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/home_community_entity.dart';

HomeCommunityEntity $HomeCommunityEntityFromJson(Map<String, dynamic> json) {
	final HomeCommunityEntity homeCommunityEntity = HomeCommunityEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		homeCommunityEntity.code = code;
	}
	final HomeCommunityObj? obj = jsonConvert.convert<HomeCommunityObj>(json['obj']);
	if (obj != null) {
		homeCommunityEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		homeCommunityEntity.msg = msg;
	}
	return homeCommunityEntity;
}

Map<String, dynamic> $HomeCommunityEntityToJson(HomeCommunityEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

HomeCommunityObj $HomeCommunityObjFromJson(Map<String, dynamic> json) {
	final HomeCommunityObj homeCommunityObj = HomeCommunityObj();
	final List<HomeCommunityObjList>? list = jsonConvert.convertListNotNull<HomeCommunityObjList>(json['list']);
	if (list != null) {
		homeCommunityObj.list = list;
	}
	final int? total = jsonConvert.convert<int>(json['total']);
	if (total != null) {
		homeCommunityObj.total = total;
	}
	return homeCommunityObj;
}

Map<String, dynamic> $HomeCommunityObjToJson(HomeCommunityObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] =  entity.list.map((v) => v.toJson()).toList();
	data['total'] = entity.total;
	return data;
}

HomeCommunityObjList $HomeCommunityObjListFromJson(Map<String, dynamic> json) {
	final HomeCommunityObjList homeCommunityObjList = HomeCommunityObjList();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		homeCommunityObjList.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		homeCommunityObjList.title = title;
	}
	final String? contacts = jsonConvert.convert<String>(json['contacts']);
	if (contacts != null) {
		homeCommunityObjList.contacts = contacts;
	}
	final String? contactWay = jsonConvert.convert<String>(json['contactWay']);
	if (contactWay != null) {
		homeCommunityObjList.contactWay = contactWay;
	}
	final List<String>? showImages = jsonConvert.convertListNotNull<String>(json['showImages']);
	if (showImages != null) {
		homeCommunityObjList.showImages = showImages;
	}
	final String? describe = jsonConvert.convert<String>(json['describe']);
	if (describe != null) {
		homeCommunityObjList.describe = describe;
	}
	final int? views = jsonConvert.convert<int>(json['views']);
	if (views != null) {
		homeCommunityObjList.views = views;
	}
	final String? publishTime = jsonConvert.convert<String>(json['publishTime']);
	if (publishTime != null) {
		homeCommunityObjList.publishTime = publishTime;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		homeCommunityObjList.createTime = createTime;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		homeCommunityObjList.updateTime = updateTime;
	}
	final int? cid = jsonConvert.convert<int>(json['cid']);
	if (cid != null) {
		homeCommunityObjList.cid = cid;
	}
	final String? typeName = jsonConvert.convert<String>(json['typeName']);
	if (typeName != null) {
		homeCommunityObjList.typeName = typeName;
	}
	final int? serviceType = jsonConvert.convert<int>(json['serviceType']);
	if (serviceType != null) {
		homeCommunityObjList.serviceType = serviceType;
	}
	return homeCommunityObjList;
}

Map<String, dynamic> $HomeCommunityObjListToJson(HomeCommunityObjList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['contacts'] = entity.contacts;
	data['contactWay'] = entity.contactWay;
	data['showImages'] =  entity.showImages;
	data['describe'] = entity.describe;
	data['views'] = entity.views;
	data['publishTime'] = entity.publishTime;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['cid'] = entity.cid;
	data['typeName'] = entity.typeName;
	data['serviceType'] = entity.serviceType;
	return data;
}